<!-- 用户列表 -->

<!-- 项目管理 -->
<template>
  <div class="page-box h100 display-flex czbj">
    <p class="title-label mb10">用户列表</p>
    <!-- sonRouter="yybureauFormationBJ" 为跳转新的页面编辑 -->
    <dxtable
      :dataJson="dataJson"
      :portUrl="portUrl"
      :formJson="formJson"
      :qx="qx"
      ref="databale"
    ></dxtable>
  </div>
</template>
<script lang="ts" setup>
import dxtable from "../../../components/util/dxtable.vue";
import sort from "../../../components/util/sort.vue";
import { dxget, dxpost } from "../../../util/index";
import { NButton, NImage, NTag } from "naive-ui";
import { h, ref, reactive } from "vue";
const databale = ref();
const initeer = () => {
  databale.value.initDataExpose();
};
let dataJson = [
  {
    title: "头像",
    type: "img",
    val: "",
    icon: "dx-img",
    span: 12,
    key: "headPortrait",
    width: "",
    search: false,
    istable: true,
    required: false,
  },
  {
    title: "真实姓名",
    type: "input",
    val: "",
    icon: "dx-shurukuang",
    span: 12,
    key: "zhensxm",
    width: "",
    search: false,
    istable: true,
    required: false,
  },
  {
    title: "手机号码",
    type: "input",
    val: "",
    icon: "dx-shurukuang",
    span: 12,
    key: "phone",
    width: "",
    search: false,
    istable: true,
    required: false,
  },
  {
    title: "公司全称",
    type: "input",
    val: "",
    icon: "dx-shurukuang",
    span: 12,
    key: "gsmc",
    width: "",
    search: true,
    istable: true,
    required: false,
  },
  {
    title: "邮箱",
    type: "input",
    val: "",
    icon: "dx-shurukuang",
    span: 12,
    key: "email",
    width: "",
    search: true,
    istable: true,
    required: false,
  },
  {
    title: "担任职务",
    type: "input",
    val: "",
    icon: "dx-shurukuang",
    span: 12,
    key: "zhiwu",
    width: "",
    search: true,
    istable: true,
    required: false,
  },
  {
    title: "业务范围",
    type: "input",
    val: "",
    icon: "dx-shurukuang",
    span: 12,
    key: "ywfw",
    width: "",
    search: true,
    istable: true,
    required: false,
  },
  {
    title: "所在城市",
    type: "input",
    val: "",
    icon: "dx-shurukuang",
    span: 12,
    key: "szcs",
    width: "",
    search: true,
    istable: true,
    required: false,
  },
  {
    title: "擅长行业",
    type: "input",
    val: "",
    icon: "dx-shurukuang",
    span: 12,
    key: "schy",
    width: "",
    search: false,
    istable: true,
    required: false,
  },
  {
    title: "擅长岗位",
    type: "input",
    val: "",
    icon: "dx-shurukuang",
    span: 12,
    key: "scgw",
    width: "",
    search: false,
    istable: true,
    required: false,
  },

  //   {
  //     title: "添加时间",
  //     key: "addTime",
  //     width: 150,
  //   },
];

const qx = {
  DeletePermissionID: "jchuserlistdel", //删除
  EditPermissionIdentifier: "jchuserlistbj", // 编辑
  NewPermissionIdentifier: "jchuserlistxz22", // 新建
  ViewPermissionID: "jchuserlistck", // 查看
};
const portUrl = "jiacaihui/userList";

let formJson = reactive([
  {
    title: "公司全称",
    type: "input",
    val: "",
    icon: "dx-shurukuang",
    span: 12,
    key: "gsmc",
    width: "",
    search: false,
    istable: true,
    required: false,
  },
  {
    title: "邮箱",
    type: "input",
    val: "",
    icon: "dx-shurukuang",
    span: 12,
    key: "email",
    width: "",
    search: false,
    istable: true,
    required: false,
  },
  {
    title: "担任职务",
    type: "input",
    val: "",
    icon: "dx-shurukuang",
    span: 12,
    key: "zhiwu",
    width: "",
    search: false,
    istable: true,
    required: false,
  },
  {
    title: "业务范围",
    type: "input",
    val: "",
    icon: "dx-shurukuang",
    span: 12,
    key: "ywfw",
    width: "",
    search: false,
    istable: true,
    required: false,
  },
  {
    title: "所在城市",
    type: "input",
    val: "",
    icon: "dx-shurukuang",
    span: 12,
    key: "szcs",
    width: "",
    search: false,
    istable: true,
    required: false,
  },
  {
    title: "擅长行业",
    type: "input",
    val: "",
    icon: "dx-shurukuang",
    span: 12,
    key: "schy",
    width: "",
    search: false,
    istable: true,
    required: false,
  },
  {
    title: "擅长岗位",
    type: "input",
    val: "",
    icon: "dx-shurukuang",
    span: 12,
    key: "scgw",
    width: "",
    search: false,
    istable: true,
    required: false,
  },
]);
const czFun = {
  fun: (row) => {
    return [
      h(
        NButton,
        {
          type: "info",
          quaternary: true,
          onClick: async (e) => {},
        },
        "复制代码"
      ),
    ];
  },
};

// 获取字典内容
// const xtgxxmfl = async () => {
//   const { data }: any = await dxget("dxgjAdmin/getzd", { name: 'xtgxxmfl' })
//   dataJson[2].options = [
//     {
//       label: "全部",
//       value: ""
//     },
//     ...data
//   ]
//   formJson[2].options = data
//   xmlxSelect.value = data
//   console.log(data);
// }
// xtgxxmfl()
</script>
<style scoped></style>
